/*
 Navicat Premium Dump SQL

 Source Server         : 8.155.145.176_Pgsql测试
 Source Server Type    : PostgreSQL
 Source Server Version : 180000 (180000)
 Source Host           : localhost:5432
 Source Catalog        : super
 Source Schema         : super

 Target Server Type    : PostgreSQL
 Target Server Version : 180000 (180000)
 File Encoding         : 65001

 Date: 20/11/2025 14:49:01
*/


-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS "super"."sys_config";
CREATE TABLE "super"."sys_config" (
  "id" int8 NOT NULL,
  "name" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "s_key" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "s_value" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
  "status" int2 NOT NULL,
  "remark" varchar(255) COLLATE "pg_catalog"."default",
  "create_time" int8,
  "create_by" int8,
  "update_time" int8,
  "update_by" int8,
  "is_deleted" int2 NOT NULL
)
;
ALTER TABLE "super"."sys_config" OWNER TO "super";
COMMENT ON COLUMN "super"."sys_config"."name" IS '配置名称';
COMMENT ON COLUMN "super"."sys_config"."s_key" IS '配置键名';
COMMENT ON COLUMN "super"."sys_config"."s_value" IS '配置键值';
COMMENT ON COLUMN "super"."sys_config"."status" IS '系统内置 1=是 0=否';
COMMENT ON COLUMN "super"."sys_config"."remark" IS '备注';
COMMENT ON COLUMN "super"."sys_config"."create_time" IS '创建时间';
COMMENT ON COLUMN "super"."sys_config"."create_by" IS '创建人ID';
COMMENT ON COLUMN "super"."sys_config"."update_time" IS '更新时间';
COMMENT ON COLUMN "super"."sys_config"."update_by" IS '更新人ID';
COMMENT ON COLUMN "super"."sys_config"."is_deleted" IS '逻辑删除';
COMMENT ON TABLE "super"."sys_config" IS '系统配置';

-- ----------------------------
-- Records of sys_config
-- ----------------------------
BEGIN;
INSERT INTO "super"."sys_config" ("id", "name", "s_key", "s_value", "status", "remark", "create_time", "create_by", "update_time", "update_by", "is_deleted") VALUES (1, '文件服务器地址', 'FileUrl', 'http://localhost:8080/static', 0, '文件访问地址', 1760941901630, 3, 1762757983001, 2, 0);
INSERT INTO "super"."sys_config" ("id", "name", "s_key", "s_value", "status", "remark", "create_time", "create_by", "update_time", "update_by", "is_deleted") VALUES (2, '测试', 'test', '1', 0, NULL, 1762755861002, 2, 1762755861002, 2, 1);
INSERT INTO "super"."sys_config" ("id", "name", "s_key", "s_value", "status", "remark", "create_time", "create_by", "update_time", "update_by", "is_deleted") VALUES (3, 'IP的QPS限流', 'IP_QPS_LIMIT', '10', 1, 'IP每秒最多请求10 次', 1762758493002, 2, 1763369730001, 2, 0);
INSERT INTO "super"."sys_config" ("id", "name", "s_key", "s_value", "status", "remark", "create_time", "create_by", "update_time", "update_by", "is_deleted") VALUES (4, '显示水印', 'ShowWatermark', '0', 0, '是否显示水印 1=是 0=否', 1763368876006, 2, 1763369003002, 2, 0);
INSERT INTO "super"."sys_config" ("id", "name", "s_key", "s_value", "status", "remark", "create_time", "create_by", "update_time", "update_by", "is_deleted") VALUES (5, '后台名称', 'AdminName', 'Super Admin', 0, '后台显示名称', 1763369076002, 2, 1763369751002, 2, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS "super"."sys_log";
CREATE TABLE "super"."sys_log" (
  "id" int8 NOT NULL,
  "username" varchar(100) COLLATE "pg_catalog"."default",
  "func" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "request_method" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "request_params" text COLLATE "pg_catalog"."default",
  "response_content" text COLLATE "pg_catalog"."default",
  "content" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "error_content" text COLLATE "pg_catalog"."default",
  "request_uri" varchar(255) COLLATE "pg_catalog"."default",
  "ip" varchar(45) COLLATE "pg_catalog"."default",
  "exec_time" int8,
  "browser" varchar(100) COLLATE "pg_catalog"."default",
  "browser_version" varchar(100) COLLATE "pg_catalog"."default",
  "os" varchar(100) COLLATE "pg_catalog"."default",
  "status" int2 NOT NULL,
  "create_by" int8,
  "create_time" int8,
  "update_by" int8,
  "update_time" int8,
  "is_deleted" int2 NOT NULL
)
;
ALTER TABLE "super"."sys_log" OWNER TO "super";
COMMENT ON COLUMN "super"."sys_log"."id" IS '主键';
COMMENT ON COLUMN "super"."sys_log"."username" IS '登录人账号';
COMMENT ON COLUMN "super"."sys_log"."func" IS '调用方法';
COMMENT ON COLUMN "super"."sys_log"."request_method" IS '请求方式';
COMMENT ON COLUMN "super"."sys_log"."request_params" IS '请求参数';
COMMENT ON COLUMN "super"."sys_log"."response_content" IS '返回参数';
COMMENT ON COLUMN "super"."sys_log"."content" IS '日志内容';
COMMENT ON COLUMN "super"."sys_log"."error_content" IS '异常信息';
COMMENT ON COLUMN "super"."sys_log"."request_uri" IS '请求路径';
COMMENT ON COLUMN "super"."sys_log"."ip" IS 'IP地址';
COMMENT ON COLUMN "super"."sys_log"."exec_time" IS '执行时间(ms)';
COMMENT ON COLUMN "super"."sys_log"."browser" IS '浏览器';
COMMENT ON COLUMN "super"."sys_log"."browser_version" IS '浏览器版本';
COMMENT ON COLUMN "super"."sys_log"."os" IS '终端系统';
COMMENT ON COLUMN "super"."sys_log"."status" IS '状态 1正常 0异常';
COMMENT ON COLUMN "super"."sys_log"."create_by" IS '创建人';
COMMENT ON COLUMN "super"."sys_log"."create_time" IS '创建时间';
COMMENT ON COLUMN "super"."sys_log"."update_by" IS '更新人';
COMMENT ON COLUMN "super"."sys_log"."update_time" IS '更新时间';
COMMENT ON COLUMN "super"."sys_log"."is_deleted" IS '逻辑删除';
COMMENT ON TABLE "super"."sys_log" IS '系统日志';

-- ----------------------------
-- Records of sys_log
-- ----------------------------
BEGIN;
INSERT INTO "super"."sys_log" ("id", "username", "func", "request_method", "request_params", "response_content", "content", "error_content", "request_uri", "ip", "exec_time", "browser", "browser_version", "os", "status", "create_by", "create_time", "update_by", "update_time", "is_deleted") VALUES (8430, NULL, 'getSystemTime', 'GET', '', NULL, '获取系统时间', NULL, '/system/time', '127.0.0.1', 0, 'Chrome', '142.0.0.0', 'OSX', 1, NULL, 1763621137005, NULL, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS "super"."sys_user";
CREATE TABLE "super"."sys_user" (
  "id" int8 NOT NULL,
  "pid" int8,
  "tree_path" varchar(255) COLLATE "pg_catalog"."default",
  "username" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "password" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
  "avatar" varchar(255) COLLATE "pg_catalog"."default",
  "nickname" varchar(100) COLLATE "pg_catalog"."default",
  "gender" int2,
  "email" varchar(64) COLLATE "pg_catalog"."default",
  "phone" varchar(32) COLLATE "pg_catalog"."default",
  "bio" varchar(255) COLLATE "pg_catalog"."default",
  "roles" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "dept_id" int8,
  "dept_tree_path" varchar(255) COLLATE "pg_catalog"."default",
  "status" int2 NOT NULL,
  "login_time" int8,
  "login_ip" varchar(100) COLLATE "pg_catalog"."default",
  "create_by" int8,
  "create_time" int8,
  "update_by" int8,
  "update_time" int8,
  "is_deleted" int2 NOT NULL
)
;
ALTER TABLE "super"."sys_user" OWNER TO "super";
COMMENT ON COLUMN "super"."sys_user"."id" IS '用户ID';
COMMENT ON COLUMN "super"."sys_user"."pid" IS '父编号';
COMMENT ON COLUMN "super"."sys_user"."tree_path" IS '树目录';
COMMENT ON COLUMN "super"."sys_user"."username" IS '用户名';
COMMENT ON COLUMN "super"."sys_user"."password" IS '密码';
COMMENT ON COLUMN "super"."sys_user"."avatar" IS '头像';
COMMENT ON COLUMN "super"."sys_user"."nickname" IS '昵称';
COMMENT ON COLUMN "super"."sys_user"."gender" IS '性别(1-男 2-女 0-保密)';
COMMENT ON COLUMN "super"."sys_user"."email" IS '邮箱';
COMMENT ON COLUMN "super"."sys_user"."phone" IS '手机号';
COMMENT ON COLUMN "super"."sys_user"."bio" IS '个人简介';
COMMENT ON COLUMN "super"."sys_user"."roles" IS '角色';
COMMENT ON COLUMN "super"."sys_user"."dept_id" IS '部门ID';
COMMENT ON COLUMN "super"."sys_user"."dept_tree_path" IS '部门树';
COMMENT ON COLUMN "super"."sys_user"."status" IS '状态(1-正常 0-停用)';
COMMENT ON COLUMN "super"."sys_user"."login_time" IS '登录时间';
COMMENT ON COLUMN "super"."sys_user"."login_ip" IS '登录IP';
COMMENT ON COLUMN "super"."sys_user"."create_by" IS '创建人';
COMMENT ON COLUMN "super"."sys_user"."create_time" IS '创建时间';
COMMENT ON COLUMN "super"."sys_user"."update_by" IS '更新人';
COMMENT ON COLUMN "super"."sys_user"."update_time" IS '更新时间';
COMMENT ON COLUMN "super"."sys_user"."is_deleted" IS '逻辑删除';
COMMENT ON TABLE "super"."sys_user" IS '系统用户';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO "super"."sys_user" ("id", "pid", "tree_path", "username", "password", "avatar", "nickname", "gender", "email", "phone", "bio", "roles", "dept_id", "dept_tree_path", "status", "login_time", "login_ip", "create_by", "create_time", "update_by", "update_time", "is_deleted") VALUES (1, 0, '0,', 'super', '$2a$10$hjLgv7wngw8Ft.GMTxptgODjZYEWbJfAxH.MV6zX2tgww5gCQWMj6', NULL, '超管', 0, 'super@admin.com', '18888888888', NULL, 'root', 1, '0,', 1, NULL, NULL, NULL, 1759184154307, NULL, NULL, 1);
INSERT INTO "super"."sys_user" ("id", "pid", "tree_path", "username", "password", "avatar", "nickname", "gender", "email", "phone", "bio", "roles", "dept_id", "dept_tree_path", "status", "login_time", "login_ip", "create_by", "create_time", "update_by", "update_time", "is_deleted") VALUES (2, 0, '0,', 'admin', '$2a$10$ZyuH1.NqXInhHxUkH003SuU9dRPqoar8/dnvaElBVN6xnJ/eKAPzq', '/avatars/2025-11-17/1763351317002-logo.png', '管理员', 1, 'admin@admin.com', '18866666666', '我是一个管理员', 'admin', 2, '0,1,', 1, 1763543476001, '127.0.0.1', NULL, 1759184204270, 1, 1763432735006, 0);
INSERT INTO "super"."sys_user" ("id", "pid", "tree_path", "username", "password", "avatar", "nickname", "gender", "email", "phone", "bio", "roles", "dept_id", "dept_tree_path", "status", "login_time", "login_ip", "create_by", "create_time", "update_by", "update_time", "is_deleted") VALUES (3, 2, '0,2,', 'zhangsan', '$2a$10$8qbsDf2OcIe4Yx20.ZTIw.m5ZzCo4.t4sX79fXBzqmhTEPCXhSg1u', NULL, '张三', 0, 'zhangsan@admin.com', '18813131414', NULL, 'user', 3, '0,1,2,', 1, NULL, NULL, 3, 1759184885229, 1, 1763450702006, 0);
INSERT INTO "super"."sys_user" ("id", "pid", "tree_path", "username", "password", "avatar", "nickname", "gender", "email", "phone", "bio", "roles", "dept_id", "dept_tree_path", "status", "login_time", "login_ip", "create_by", "create_time", "update_by", "update_time", "is_deleted") VALUES (5, NULL, NULL, 'lisi', '$2a$10$wfNsVK3hWX/VizeJK18.Be0XX4ahIQY8FJMYJhO19yYSSiO2OplNq', NULL, '李四', 0, 'lisi@admin.com', '18813131212', NULL, 'user', 3, '0,1,2,', 1, NULL, NULL, NULL, 1763113966000, 1, 1763432750005, 0);
COMMIT;

-- ----------------------------
-- Table structure for tb_demo
-- ----------------------------
DROP TABLE IF EXISTS "super"."tb_demo";
CREATE TABLE "super"."tb_demo" (
  "id" int8 NOT NULL,
  "a" varchar(255) COLLATE "pg_catalog"."default",
  "b" int4,
  "c" float8,
  "d" int8,
  "create_by" int8,
  "create_time" int8,
  "update_by" int8,
  "update_time" int8,
  "is_deleted" int2 NOT NULL,
  "e" text COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "super"."tb_demo" OWNER TO "super";

-- ----------------------------
-- Records of tb_demo
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Primary Key structure for table sys_config
-- ----------------------------
ALTER TABLE "super"."sys_config" ADD CONSTRAINT "sys_config_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_log
-- ----------------------------
CREATE INDEX "idx_create_time" ON "super"."sys_log" USING btree (
  "create_time" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table sys_log
-- ----------------------------
ALTER TABLE "super"."sys_log" ADD CONSTRAINT "sys_log_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table sys_user
-- ----------------------------
CREATE UNIQUE INDEX "uk_username" ON "super"."sys_user" USING btree (
  "username" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table sys_user
-- ----------------------------
ALTER TABLE "super"."sys_user" ADD CONSTRAINT "sys_user_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table tb_demo
-- ----------------------------
ALTER TABLE "super"."tb_demo" ADD CONSTRAINT "tb_demo_pkey" PRIMARY KEY ("id");
